package com.hundsun.cprs.yyt.service.quota.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @author herong22384
 * @date 2019/8/5 16:33
 */
public enum EnumQuotaType {

    COMMON("common","通用配额"),
    SPECIAL("special","专用配额");

    private String code;
    private String desc;

    EnumQuotaType(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    /**
     * 全局索引池
     */
    private static Map<String, EnumQuotaType> pool = new HashMap<String, EnumQuotaType>();
    static {
        for (EnumQuotaType et : EnumQuotaType.values()) {
            pool.put(et.code + "", et);
        }
    }

    public static Map<String, EnumQuotaType> toMap() {
        return pool;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
